package fons.navigator.export;

import fons.model.ontology.Context;
import fons.model.ontology.Selection;
import fons.navigator.views.NavigatorAbstractView;

@SuppressWarnings("unused")
public class StandardExporter extends AbstractExporter {

	private final ExportableItemRepository repository;
	private Selection selection;
	private NavigatorAbstractView view;
	private Context context;
	
	public StandardExporter(Selection selection, NavigatorAbstractView view, Context context) {
		this.repository = new ExportableItemRepository();
		this.selection = selection;
		this.view = view;
		this.context = context;
		this.repository.addAll(view.getExportableItems());
	}
	
	@Override
	public void export(Selection selection, NavigatorAbstractView view, Context context) {
		this.selection = selection;
		this.view = view;
		this.context = context;
		this.repository.clear();
		this.repository.addAll(view.getExportableItems());
	}

	@Override
	public ExportableItemRepository getRepositoryReference() {
		return repository;
	}

}
